package com.cat.model.biz.service.admin.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alonew.db.dao.TxCommonDAO;
import com.cat.model.biz.service.admin.BasService;
import com.cat.model.common.model.common.BasConfigVO;

@Service("basService")
public class BasServiceImpl implements BasService{
	@Autowired
	private TxCommonDAO commonDAO;
	
	@Override
	public BasConfigVO createBasConfig(BasConfigVO BasConfig){
		commonDAO.insert(BasConfig);
		
		return BasConfig;
	}
	
	@Override
	public int deleteBasConfig(long id){
		BasConfigVO BasConfig = new BasConfigVO();
		BasConfig.setId(id);
		return commonDAO.deleteById(BasConfig);
	}
	
	@Override
	public int updateBasConfig(BasConfigVO BasConfig){
		return commonDAO.updateById(BasConfig, "name","description","configValue","editFlag","nameLabel");
	}
}
